<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
<link rel="stylesheet" type="text/css" href="__APP__/style/thickbox.css"/>
<script type='text/javascript' src='__APP__/js/jquery.js'></script>
<script type="text/javascript" src="__APP__/js/thickbox_plus.js"></script>
<title>轻国轻城</title>
<style type="text/css" >
*{
	margin:0;
	padding:0;
	font-size:14px;
	}
div{
	overflow:hidden;
	}
#box{
	width:100%;
	height:100%;
	background-color:#eeeeee;
	}
#top{
	 width:100%;
	 height:70px;
	 background-color:#50abff;}
#down{
	 width:1100px;
	 margin-left:auto;
	 margin-right:auto;
	 background:#FFF;
	  }
#left{
	 width:200px;
     float:left;
     height:750px;
	 background-color:#a1d2ff;
	 }
#right{

	 width:895px;

	 float:left;}
#nav{
    margin-top:50px;
    margin-left:40px;


}
li{
	font-size:18px;

	list-style:none;
	height:30px;}
li a{  text-decoration:none;
    color:#666;}
li a:hover{
	color:#F60;
	background-color:#ffb;
	}
img{
 border:0px;
}


</style>
<script type='text/javascript'>


</script>
</head>
<div id="box">
	<div id="top">
    	<div style=" width:1000px; margin-right:auto; margin-left:auto;"><a style="font-size:50px; color:#FFF; font-family:'Palatino Linotype', 'Book Antiqua', Palatino, serif;">GDQY_MSG</a></div>
        </div>
    <div id="down">
        <div id="left">
              <div id='nav'>
                 <li><a href='#'>首页</a></li>
                 <li><a href='__ROOT__/admin.php/User/user_list'>用户管理区</a></li>
                 <li><a href='__ROOT__/admin.php/MsgCate/Msg_cate'>信息分类管理</a></li>
                 <li><a href='__ROOT__/admin.php/Msg/Msg'>信息管理区</a></li>
                 <li><a href='#'>好友管理区</a></li>
                 <li><a href='#'>系统管理员</a></li>
                 <li><a href='#'>系统配置参数</a></li>
                 <li><a href='#'>系统动态图像</a></li>
              </div>
        </div>


<script type='text/javascript'>
  function insert_check(){
    if(cate_insert.cate_name.value==''){
     alert('按要求填写！');
     return false;
    }
    return true;
  }
  function upd_check(){
    if(cate_upd.cate_name.value==''){
     alert('按要求填写！');
     return false;
    }
    return true;
  }

</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />

        <div id="right">
        <div style='width:900px;height:5px;background-color:#a1d2ff;margin-top:8px;'></div>
        <div style='width:400px;height:200px;margin-top:20px;margin-right:auto;margin-left:auto;'>

        	 <form name='cate_insert' action="insert_cate" method='post'>
        	<table>
        		<tr style='height:40px;'>
        			<td>添加分类名:</td>
        			<td><input name='cate_name'></td><td style='color:red'>&nbsp;*</td>
        		</tr>
        		<tr>
	        			<td>添加到该分类下:</td>
	        			<td>
	        			<select name='cate_sel'>
	        			<option value='0' selected>最顶级别</option>
	                         <?php if(is_array($list_cate)): $i = 0; $__LIST__ = $list_cate;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$list): $mod = ($i % 2 );++$i;?><option value='<?php echo ($list["cate_id"]); ?>|<?php echo ($list["bpath"]); ?>'>
		                             <?php $spa =''; for($i=0;$i<$list['count'];$i++){ echo $spa.='&nbsp;'; }; echo $spa; echo ($list["cate_name"]); ?>
		                        </option><?php endforeach; endif; else: echo "" ;endif; ?>
	                   </select>
	                   </td>
        		</tr>
        	      <tr style='margin-top:10px;height:50px;''>
	        	    <td >加个备注：</td>
	        	    <td ><textarea name='remark'></textarea> </td>
        	    </tr>
        		<tr>
        			<td></td>
        			<td style='float:right;margin-top:12px;'><input type='submit' name='sub' value='submit' onclick='return insert_check()'></td>
        		</tr>


        	</table>
        	</form>
        </div>
        <div style='width:900px;height:5px;background-color:#a1d2ff;margin-top:8px;'></div>
        <div style='width:400px;height:200px;margin-top:20px;margin-right:auto;margin-left:auto;'>

        	 <form name='cate_del' action="del_cate" method='post'>
        	<table>
        		<tr>
	        			<td>删除该分类以及子分类:</td>
	        			<td></td>
        		</tr>

        		<tr>
        			<td><select name='cate_sel'>
	                         <?php if(is_array($list_cate)): $i = 0; $__LIST__ = $list_cate;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$list): $mod = ($i % 2 );++$i;?><option value='<?php echo ($list["cate_id"]); ?>|<?php echo ($list["bpath"]); ?>'>
		                             <?php $spa =''; for($i=0;$i<$list['count'];$i++){ echo $spa.='&nbsp;'; }; echo $spa; echo ($list["cate_name"]); ?>
		                        </option><?php endforeach; endif; else: echo "" ;endif; ?>
	                   </select></td>
        			<td style='float:right;margin-top:12px;'><input type='submit' name='sub' value='delete'></td>
        		</tr>


        	</table>
        	</form>
        </div>
        <div style='width:900px;height:5px;background-color:#a1d2ff;margin-top:8px;'></div>
        <div style='width:400px;height:200px;margin-top:20px;margin-right:auto;margin-left:auto;'>

        	 <form name='cate_upd' action="upd_cate" method='post'>
        	<table>

        		<tr>
	        			<td>把该分类名称:</td>
	        			<td>
	        			<select name='cate_sel'>
	                         <?php if(is_array($list_cate)): $i = 0; $__LIST__ = $list_cate;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$list): $mod = ($i % 2 );++$i;?><option value='<?php echo ($list["cate_id"]); ?>|<?php echo ($list["bpath"]); ?>'>
		                             <?php $spa =''; for($i=0;$i<$list['count'];$i++){ echo $spa.='&nbsp;'; }; echo $spa; echo ($list["cate_name"]); ?>
		                        </option><?php endforeach; endif; else: echo "" ;endif; ?>
	                   </select>
	                   </td>
        		</tr>
        		<tr style='height:40px;'>
        			<td>修改为:</td>
        			<td><input name='cate_name'></td><td style='color:red'>&nbsp;*</td>
        		</tr>
        		<tr style='margin-top:10px;height:50px;''>
	        	    <td >写个备注：</td>
	        	    <td ><textarea name='remark'></textarea> </td>
        	    </tr>
        		<tr>
        			<td></td>
        			<td style='float:right;margin-top:12px;'><input type='submit' name='sub' value='update' onclick='return upd_check();'></td>
        		</tr>

        	</table>
        	</form>
        </div>
    </div>
</div>

</body>
</html>